<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class Bundler::Env - bundler: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../Object.html">Object</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-append_formatted_table">::append_formatted_table</a>
    <li ><a href="#method-c-chruby_version">::chruby_version</a>
    <li ><a href="#method-c-environment">::environment</a>
    <li ><a href="#method-c-git_version">::git_version</a>
    <li ><a href="#method-c-read_file">::read_file</a>
    <li ><a href="#method-c-report">::report</a>
    <li ><a href="#method-c-ruby_version">::ruby_version</a>
    <li ><a href="#method-c-version_of">::version_of</a>
    <li ><a href="#method-c-write">::write</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-Bundler::Env">
    <h1 id="class-Bundler::Env" class="class">
      class Bundler::Env
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">





                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-environment" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">environment</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="environment-source">
            <pre><span class="ruby-comment"># File bundler/env.rb, line 92</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">environment</span>
  <span class="ruby-identifier">out</span> = []

  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;Bundler&quot;</span>, <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Platforms&quot;</span>, <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">platforms</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&quot;, &quot;</span>)]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;Ruby&quot;</span>, <span class="ruby-identifier">ruby_version</span>]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Full Path&quot;</span>, <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">ruby</span>]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Config Dir&quot;</span>, <span class="ruby-constant">Pathname</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">ConfigFile</span><span class="ruby-operator">::</span><span class="ruby-constant">SYSTEM_WIDE_CONFIG_FILE</span>).<span class="ruby-identifier">dirname</span>]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;RubyGems&quot;</span>, <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Gem Home&quot;</span>, <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">dir</span>]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Gem Path&quot;</span>, <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>)]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  User Home&quot;</span>, <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">user_home</span>]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  User Path&quot;</span>, <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">user_dir</span>]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Bin Dir&quot;</span>, <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">bindir</span>]
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">SSL</span>)
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;OpenSSL&quot;</span>]
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Compiled&quot;</span>, <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">OPENSSL_VERSION</span>] <span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">OPENSSL_VERSION</span>)
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Loaded&quot;</span>, <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">OPENSSL_LIBRARY_VERSION</span>] <span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">OPENSSL_LIBRARY_VERSION</span>)
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Cert File&quot;</span>, <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">X509</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_CERT_FILE</span>] <span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">X509</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_CERT_FILE</span>)
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Cert Dir&quot;</span>, <span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">X509</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_CERT_DIR</span>] <span class="ruby-keyword">if</span> <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">OpenSSL</span><span class="ruby-operator">::</span><span class="ruby-constant">X509</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_CERT_DIR</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;Tools&quot;</span>]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  Git&quot;</span>, <span class="ruby-identifier">git_version</span>]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  RVM&quot;</span>, <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-string">&quot;rvm_version&quot;</span>) { <span class="ruby-identifier">version_of</span>(<span class="ruby-string">&quot;rvm&quot;</span>) }]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  rbenv&quot;</span>, <span class="ruby-identifier">version_of</span>(<span class="ruby-string">&quot;rbenv&quot;</span>)]
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;  chruby&quot;</span>, <span class="ruby-identifier">chruby_version</span>]

  <span class="ruby-node">%w[rubygems-bundler open_gem]</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">specs</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">find_name</span>(<span class="ruby-identifier">name</span>)
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-node">&quot;  #{name}&quot;</span>, <span class="ruby-node">&quot;(#{specs.map(&amp;:version).join(&quot;,&quot;)})&quot;</span>] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">specs</span>.<span class="ruby-identifier">empty?</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">if</span> (<span class="ruby-identifier">exe</span> = <span class="ruby-identifier">caller</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;:&quot;</span>).<span class="ruby-identifier">first</span>)&amp;.<span class="ruby-identifier">match?</span> <span class="ruby-regexp">%r{(exe|bin)/bundler?\z}</span>
    <span class="ruby-identifier">shebang</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">exe</span>).<span class="ruby-identifier">lines</span>.<span class="ruby-identifier">first</span>
    <span class="ruby-identifier">shebang</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp">/^#!\s*/</span>, <span class="ruby-string">&quot;&quot;</span>)
    <span class="ruby-keyword">unless</span> <span class="ruby-identifier">shebang</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-constant">Gem</span>.<span class="ruby-identifier">ruby</span>, <span class="ruby-string">&quot;/usr/bin/env ruby&quot;</span>)
      <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;Gem.ruby&quot;</span>, <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">ruby</span>]
      <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-string">&quot;bundle #!&quot;</span>, <span class="ruby-identifier">shebang</span>]
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">out</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-report" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">report</span><span
                                class="method-args">(options = {})</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="report-source">
            <pre><span class="ruby-comment"># File bundler/env.rb, line 12</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">report</span>(<span class="ruby-identifier">options</span> = {})
  <span class="ruby-identifier">print_gemfile</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:print_gemfile</span>) { <span class="ruby-keyword">true</span> }
  <span class="ruby-identifier">print_gemspecs</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:print_gemspecs</span>) { <span class="ruby-keyword">true</span> }

  <span class="ruby-identifier">out</span> = <span class="ruby-constant">String</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-identifier">append_formatted_table</span>(<span class="ruby-string">&quot;Environment&quot;</span>, <span class="ruby-identifier">environment</span>, <span class="ruby-identifier">out</span>)
  <span class="ruby-identifier">append_formatted_table</span>(<span class="ruby-string">&quot;Bundler Build Metadata&quot;</span>, <span class="ruby-constant">BuildMetadata</span>.<span class="ruby-identifier">to_h</span>, <span class="ruby-identifier">out</span>)

  <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n## Bundler settings\n\n```\n&quot;</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">setting</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">setting</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
      <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">pretty_values_for</span>(<span class="ruby-identifier">setting</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;  &quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;```\n&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">out</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">in_bundle?</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">print_gemfile</span>
    <span class="ruby-identifier">gemfiles</span> = [<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_gemfile</span>]
    <span class="ruby-keyword">begin</span>
      <span class="ruby-identifier">gemfiles</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>.<span class="ruby-identifier">gemfiles</span>
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">GemfileNotFound</span>
      <span class="ruby-keyword">nil</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n## Gemfile\n&quot;</span>
    <span class="ruby-identifier">gemfiles</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gemfile</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;\n### #{Pathname.new(gemfile).relative_path_from(SharedHelpers.pwd)}\n\n&quot;</span>
      <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;```ruby\n&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">read_file</span>(<span class="ruby-identifier">gemfile</span>).<span class="ruby-identifier">chomp</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n```\n&quot;</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;\n### #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}\n\n&quot;</span>
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;```\n&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">read_file</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_lockfile</span>).<span class="ruby-identifier">chomp</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n```\n&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">print_gemspecs</span>
    <span class="ruby-identifier">dsl</span> = <span class="ruby-constant">Dsl</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">tap</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">eval_gemfile</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_gemfile</span>) }
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n## Gemspecs\n&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">gemspecs</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-identifier">dsl</span>.<span class="ruby-identifier">gemspecs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gs</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;\n### #{File.basename(gs.loaded_from)}&quot;</span>
      <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n\n```ruby\n&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">read_file</span>(<span class="ruby-identifier">gs</span>.<span class="ruby-identifier">loaded_from</span>).<span class="ruby-identifier">chomp</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n```\n&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">out</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-write" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">write</span><span
                                class="method-args">(io)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="write-source">
            <pre><span class="ruby-comment"># File bundler/env.rb, line 8</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">write</span>(<span class="ruby-identifier">io</span>)
  <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span> <span class="ruby-identifier">report</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Class Methods</h3>
                </header>

                  <div id="method-c-append_formatted_table" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">append_formatted_table</span><span
                                class="method-args">(title, pairs, out)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="append_formatted_table-source">
            <pre><span class="ruby-comment"># File bundler/env.rb, line 135</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">append_formatted_table</span>(<span class="ruby-identifier">title</span>, <span class="ruby-identifier">pairs</span>, <span class="ruby-identifier">out</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">pairs</span>.<span class="ruby-identifier">empty?</span>
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;\n&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">empty?</span>
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;## #{title}\n\n```\n&quot;</span>
  <span class="ruby-identifier">ljust</span> = <span class="ruby-identifier">pairs</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">_v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">length</span> }.<span class="ruby-identifier">max</span>
  <span class="ruby-identifier">pairs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{k.to_s.ljust(ljust)}  #{v}\n&quot;</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">out</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;```\n&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-chruby_version" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">chruby_version</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="chruby_version-source">
            <pre><span class="ruby-comment"># File bundler/env.rb, line 86</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">chruby_version</span>
  <span class="ruby-keyword">return</span> <span class="ruby-string">&quot;not installed&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">which</span>(<span class="ruby-string">&quot;chruby-exec&quot;</span>)
  <span class="ruby-string">`chruby-exec -- chruby --version`</span>.
    <span class="ruby-identifier">sub</span>(<span class="ruby-regexp">/.*^chruby: (#{Gem::Version::VERSION_PATTERN}).*/m</span>, <span class="ruby-string">&#39;\1&#39;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-git_version" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">git_version</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="git_version-source">
            <pre><span class="ruby-comment"># File bundler/env.rb, line 75</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">git_version</span>
  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">GitProxy</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-keyword">nil</span>).<span class="ruby-identifier">full_version</span>
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Source</span><span class="ruby-operator">::</span><span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">GitNotInstalledError</span>
  <span class="ruby-string">&quot;not installed&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-read_file" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">read_file</span><span
                                class="method-args">(filename)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="read_file-source">
            <pre><span class="ruby-comment"># File bundler/env.rb, line 63</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">read_file</span>(<span class="ruby-identifier">filename</span>)
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">read_file</span>(<span class="ruby-identifier">filename</span>.<span class="ruby-identifier">to_s</span>).<span class="ruby-identifier">strip</span>
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
  <span class="ruby-node">&quot;&lt;No #{filename} found&gt;&quot;</span>
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">RuntimeError</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">e</span>
  <span class="ruby-node">&quot;#{e.class}: #{e.message}&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-ruby_version" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">ruby_version</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="ruby_version-source">
            <pre><span class="ruby-comment"># File bundler/env.rb, line 71</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">ruby_version</span>
  <span class="ruby-node">&quot;#{RUBY_VERSION}p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{Gem::Platform.local}]&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-c-version_of" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">version_of</span><span
                                class="method-args">(script)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="version_of-source">
            <pre><span class="ruby-comment"># File bundler/env.rb, line 81</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">version_of</span>(<span class="ruby-identifier">script</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-string">&quot;not installed&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">which</span>(<span class="ruby-identifier">script</span>)
  <span class="ruby-node">`#{script} --version`</span>.<span class="ruby-identifier">chomp</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>. </p><p><a href="https://jamesbritt.bandcamp.com/">Hack your world.  Feed your head.  Live curious</a>.</p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

